﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Markup;
using System.Windows.Media.Media3D;

namespace 数字孪生Demo.Base
{
    public class TranslateExtension : MarkupExtension
    {
        private Vector3D offset;

        public TranslateExtension(double x,double y,double z)
        {
            this.offset = new Vector3D(x,y,z);
        }

        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return new TranslateTransform3D(offset);
        }
    }
}
